package com.grad.webstudy.model;

import java.io.Serializable;

/**
 * @Description: token实体类
 * @Author: zjf
 * @Date: 2020/1/19 14:08.
 */
public class Token implements Serializable {

    private String userId;

    private String token;

    private User user;

    public Token(String userId, String token) {
        this.userId = userId;
        this.token = token;
    }


    // TODO: 2020/2/11 增加建造者模式 
    public Token(String userId, String token, User user) {
        this.userId = userId;
        this.token = token;
        this.user = user;
    }

    public Token() {
    }

    @Override
    public String toString() {
        return "Token{" +
                "userId='" + userId + '\'' +
                ", token='" + token + '\'' +
                ", user=" + user +
                '}';
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
